package com.logic.meetingapp;

import androidx.appcompat.app.ActionBar;

import android.content.ComponentName;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.view.Window;
import android.view.WindowManager;

import com.logic.meeting.app.main.IndexBaseDelegate;
import com.logic.meeting.app.util.Density;
import com.logic.meeting.app.util.SoundPlayUtils;
import com.logic.meeting.core.activities.ProxyActivity;
import com.logic.meeting.core.app.Atmos;
import com.logic.meeting.core.delegates.AtmosDelegate;
import com.logic.meeting.core.util.dimen.DimenUtil;

import qiu.niorgai.StatusBarCompat;

public class MainActivity extends ProxyActivity {

    private final StringBuilder sb = new StringBuilder();
    private static final int END_CHAR_ID = 66;
    private static final int BLANK_CHAR_ID = 59;

    @Override
    public AtmosDelegate setRootDelegate() {
        return new IndexBaseDelegate();
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // 设置全屏模式
        final ActionBar actionBar = getSupportActionBar();
        if (actionBar != null) {
            actionBar.hide();
        }
        Atmos.getConfigurator().withActivity(this);
        StatusBarCompat.translucentStatusBar(this, true);

        Density.setDensity(getApplication(), this);
        SoundPlayUtils.init(this);

        System.out.println("getScreenHeight=========>" + DimenUtil.getScreenHeight());
        System.out.println("getScreenWidth=========>" + DimenUtil.getScreenWidth());

        getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
//        Intent intent = new Intent("com.xxx.action.HIDE_STATUS_BAR");
//        intent.putExtra("hide", true);//true则隐藏，false则显示
//        sendBroadcast(intent);

    }
}